public class Bomb {
    private int x;
    private int y;
    private int timer;
    private int anim;
    private int anim2;
    private int size;
            
    public Bomb(int x, int y, int size) {
        this.x = x;
        this.y = y;
        this.size = size;
        timer = 50;
        anim = 0;
        anim2 = 0;
    }
    
    public int x() {
        return x;
    }
    
    public int y() {
        return y;
    }
    
    public int size() {
        return size;
    }
    
    public boolean boom() {
        timer--;
        if (timer == 0) return true;
        return false;
    }
    
    public int anim() {
        anim2++;
        if (anim2 == 5) {
            anim2 = 0;
            anim++;
            if (anim > 2) anim = 0;
        }
        return anim;
    }
    
    public void explode() {
        timer = 1;
    }
}
